﻿using System;
using System.Web.UI.WebControls;
using Medianamik.UI.Web.MVP.View;

namespace Medianamik.UI.Web.Shop
{
    public partial class ShopCompanyList : ModuleViewWithGrid<ICompanyList>, ICompanyList
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        public override IMedianamikGrid Grid
        {
            get { return (IMedianamikGrid)CompanyListGrid; }
        }

        public override HyperLink AddButton
        {
            get { return AddArticleButton; }
        }

        public override string ListingPageUrl
        {
            get { return Pages.CompanyList; }
        }

        public override string EditPageUrl
        {
            get
            {
                return Pages.CompanyEdit;
            }
        }

        public override Guid BaseTypeId
        {
            get
            {
                return TypeIds.Company;
            }
        }

        public override Guid ModuleNodeId
        {
            get
            {
                return Modules.Shop;
            }
        }

        public override string BreadcrumbTrail
        {
            get { return Breadcrumbs.Text; }
            set { Breadcrumbs.Text = value; }
        }

        public override string ChildrenListingPageUrl
        {
            get { return ParentNodeId == ModuleNodeId ? Pages.AddressList : base.ChildrenListingPageUrl; }
        }

        public override bool IsMultiLingual
        {
            get
            {
                return true;
            }
        }
    }

    public interface ICompanyList : IModuleViewWithGrid
    {
    }
}
